package com.malty.rocketmq.consumer;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author malty
 */
@Slf4j
@Component
@RocketMQMessageListener(consumerGroup = "test_tx", topic = "java-client-test-tx",messageModel = MessageModel.CLUSTERING)
public class TxConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        log.info("监听到tx消息，message：{}", message);
    }
}
